﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ViewAll.ascx.cs" Inherits="Team4Mock.UserControl.Service.ViewAll" %>
<%@ Register Src="~/UserControl/Service/AddService.ascx" TagName="ServiceAdd" TagPrefix="uc1" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<link href="../../Source/Styles/Service.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
    $(document).ready(function () {

        $(".tab_content").hide();
        $("ul.tabs li:first").addClass("active").show();
        $(".tab_content:first").show();

        $("ul.tabs li").click(function () {

            $("ul.tabs li").removeClass("active");
            $(this).addClass("active");
            $(".tab_content").hide();

            var activeTab = $(this).find("a").attr("href");
            $(activeTab).fadeIn();
            return false;
        });
    });
</script>
<script type="text/javascript">
    function CheckOtherIsCheckedByGV(spanChk) {
        var IsChecked = spanChk.checked;
        if (IsChecked) {
            spanChk.parentElement.parentElement.style.backgroundColor = 'lavender';

        }
        var CurrentRdbID = spanChk.id;
        var Chk = spanChk;
        Parent = document.getElementById("<%=GridView1.ClientID%>");
        var items = Parent.getElementsByTagName('input');
        for (i = 0; i < items.length; i++) {
            if (items[i].id != CurrentRdbID && items[i].type == "radio") {
                if (items[i].checked) {
                    items[i].checked = false;
                    items[i].parentElement.parentElement.style.backgroundColor = 'white';
                    items[i].parentElement.parentElement.style.color = 'black';
                }
            }
        }
    }
    function CheckOtherIsCheckedByGVID(spanChk) {
        var IsChecked = spanChk.checked;
        if (IsChecked) {
            spanChk.parentElement.parentElement.style.backgroundColor = 'lavender';

        }
        var CurrentRdbID = spanChk.id;
        var Chk = spanChk;
        Parent = document.getElementById("<%=gvService.ClientID%>");
        var items = Parent.getElementsByTagName('input');
        for (i = 0; i < items.length; i++) {
            if (items[i].id != CurrentRdbID && items[i].type == "radio") {
                if (items[i].checked) {
                    items[i].checked = false;
                    items[i].parentElement.parentElement.style.backgroundColor = 'white';
                    items[i].parentElement.parentElement.style.color = 'black';
                }
            }
        }
    }
    function getValueHidden() {
        var s = document.getElementById('id').value;
        if (s != "") {
            document.getElementById('<%=hdContact.ClientID%>').value = s;
        }
        var f = document.getElementById('hdMedia').value;
        if (f != "") {
            document.getElementById('<%=idMediaContact.ClientID%>').value = f;
        }
    }
</script>
<script type="text/javascript">
    function PopupContact() {
        window.open("/FormView/PopupContact.aspx", 'popUpWindow', 'height=500,width=800,left=300,top=100,resizable=No,scrollbars=No,toolbar=no,menubar=no,location=no,directories=no, status=No');
    }
    function PopupMedia() {
        window.open("/FormView/MediaPopup.aspx", 'popUpWindow', 'height=500,width=800,left=300,top=100,resizable=No,scrollbars=No,toolbar=no,menubar=no,location=no,directories=no, status=No');
    }
    function ChangeRole() {
        window.open("/FormView/ChangeRole.aspx", 'popUpWindow', 'height=350,width=650,left=300,top=100,resizable=No,scrollbars=No,toolbar=no,menubar=no,location=no,directories=no, status=No');
    }
</script>
<asp:Panel ID="pnView" runat="server">
    <div id="Directorate" class="tab_content">
        <fieldset style="margin-left: 0px; width: 740px;">
            <legend style="height: 25px; background-color: #465c71; -webkit-border-radius: 5px 5px 0px 0px;
                color: #dde4ec; font-size: 15px;">Service List</legend>
            <div style="width: 486px; float: left; height: 32px; font-size: 14px; line-height: 32px;">
                <a href="#">All</a>&nbsp;&nbsp;| <a href="#">0-9</a>&nbsp;&nbsp;| <a href="#">A-B-C-D-E</a>&nbsp;&nbsp;|
                <a href="#">F-G-H-I-J</a>&nbsp;&nbsp;| <a href="#">K-L-M-N</a>&nbsp;&nbsp;| <a href="#">
                    O-P-Q-R</a>&nbsp;&nbsp;| <a href="#">S-T-U-V</a>&nbsp;&nbsp;| <a href="#">W-X-Y-Z</a>
            </div>
            <div style="float: left; height: 32px; line-height: 32px;">
                <asp:Button ID="btnCopy" runat="server" Text="Copy" CssClass="button" OnClick="btnCopy_Click" />&nbsp;
                <asp:Button ID="btnCreate" runat="server" Text="Create" CssClass="button" OnClick="btnCreate_Click" />&nbsp;
                <asp:CheckBox ID="CheckBox1" runat="server" Text="In-active" Style="font-size: 15px;" />
            </div>
            <div style="width: 784px;">
                <asp:GridView ID="gvService" AutoGenerateColumns="False" DataKeyNames="ID" runat="server"
                    Width="725px" Font-Size="15px" BackColor="White" BorderColor="#CCCCCC" AllowSorting="true"
                    BorderStyle="None" BorderWidth="1px" CellPadding="3">
                    <Columns>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <asp:RadioButton ID="rdbauthid" runat="server" GroupName="selectradio" onclick="javascript:CheckOtherIsCheckedByGVID(this);" />
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="ID" Visible="false">
                            <ItemTemplate>
                                <asp:Label ID="lbID" runat="server" Text='<%#Eval("ID") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Service Name">
                            <ItemTemplate>
                                <asp:HyperLink ID="OrgName" runat="server" NavigateUrl='<%#"/FormView/Service.aspx?"+"ID="+Eval("ID") %>'
                                    Text='<%#Eval("Name") %>'></asp:HyperLink>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Description">
                            <ItemTemplate>
                                <asp:Label ID="lbHOA" runat="server" Text='<%#Eval("Des") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Service Type">
                            <ItemTemplate>
                                <asp:Label ID="lbPostcode" runat="server" Text='<%#Eval("Type") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Contact">
                            <ItemTemplate>
                                <asp:Label ID="lbContact" runat="server" Text='<%#Eval("Contact") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Is Active">
                            <ItemTemplate>
                                <asp:Label ID="lbActive" runat="server" Text='<%#Eval("IsActive") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <FooterStyle BackColor="White" ForeColor="#000066" />
                    <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                    <RowStyle ForeColor="#000066" />
                    <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                </asp:GridView>
            </div>
            <asp:UpdatePanel ID="pnanel" runat="server">
                <ContentTemplate>
                    <p style="width: 725px; background-color: lavender; line-height: 25px; font-size: 15px;">
                        <asp:Label ID="tb" runat="server"></asp:Label>
                    </p>
                </ContentTemplate>
                <Triggers>
                    <asp:AsyncPostBackTrigger ControlID="btnCopy" EventName="Click" />
                </Triggers>
            </asp:UpdatePanel>
            <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="pnanel">
            </asp:UpdateProgress>
        </fieldset>
    </div>
</asp:Panel>
<asp:Panel ID="pnAdd" runat="server">
    <uc1:ServiceAdd ID="AddSer" runat="server" />
</asp:Panel>
<asp:Panel ID="pnAmend" runat="server" Width="755px">
    <h3>
        Service Details</h3>
    <div style="width: 757px;">
        <ul class="tabs" style="width: 760px; float: left;">
            <li><a href="#Details1" class="tab">Details1</a></li>
            <li><a href="#Details2" class="tab">Details2</a></li>
            <li><a href="#Details3" class="tab">Details3</a></li>
            <asp:Label runat="server" ID="lbdiv"></asp:Label>
            <li><a href="#Org" class="tab">Organisation</a></li>
            <li><a href="#Premises" class="tab">Premises</a></li>
        </ul>
        <br />
        <div class="tab_container">
            <div id="Details1" class="tab_content">
                <table width="760px" cellpadding="0px" cellspacing="0px" border="0" style="font-size: 15px;">
                    <tr>
                        <td class="style1">
                            Service Name <span style="color: Red;">(*)</span>
                        </td>
                        <td class="style9">
                            <asp:TextBox ID="txtSerName" runat="server" Width="186px"></asp:TextBox>
                        </td>
                        <td class="style2">
                            Service Active
                        </td>
                        <td class="style6">
                            <asp:CheckBox ID="ckActive" Checked="true" Enabled="false" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td class="style1">
                            Service Short Description <span style="color: Red;">(*)</span>
                        </td>
                        <td class="style13">
                            <asp:TextBox ID="txtShortDes" runat="server" TextMode="MultiLine" Height="63px" Width="186px"
                                Style="margin-left: 0px"></asp:TextBox>
                        </td>
                        <td class="style2">
                            Service Full Description
                        </td>
                        <td>
                            <asp:TextBox ID="txtDesFull" runat="server" Height="63px" Style="margin-left: 0px"
                                TextMode="MultiLine" Width="186px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="style36">
                            Lead Contact
                        </td>
                        <td class="style7">
                            <input type="text" id="Name" readonly="readonly" style="width: 104px" />
                            <input type="hidden" id="id" />
                            &nbsp;&nbsp; <a href="#" onclick="PopupContact();return false;">Lookup</a>
                            <asp:HiddenField ID="hdContact" runat="server" />
                        </td>
                        <td class="style37">
                            Dept Code <span style="color: Red;">(*)</span>
                        </td>
                        <td class="style7">
                            <asp:TextBox ID="txtDeptCode" runat="server" Width="185px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="style29">
                            Sub Type
                        </td>
                        <td class="style31">
                            <asp:DropDownList ID="dlServiceSubType" AutoPostBack="true" runat="server" Width="190px"
                                OnSelectedIndexChanged="dlServiceSubType_SelectedIndexChanged">
                                <asp:ListItem Value="Normal">Normal</asp:ListItem>
                                <asp:ListItem Value="Contract">Contract</asp:ListItem>
                                <asp:ListItem Value="Funding">Funding</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                        <td class="style30">
                            Service Type <span style="color: Red;">(*)</span>
                        </td>
                        <td class="style31">
                            <asp:DropDownList ID="dlSerType" runat="server" Width="190px">
                                <asp:ListItem Value="Service Type 1">Service Type 1</asp:ListItem>
                                <asp:ListItem Value="Service Type 2">Service Type 2</asp:ListItem>
                                <asp:ListItem Value="Service Type 3">Service Type 3</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td class="style1">
                            Client Description
                        </td>
                        <td>
                            <asp:TextBox ID="txtClientDes" TextMode="MultiLine" runat="server" Width="186px"
                                Height="46px"></asp:TextBox>
                        </td>
                        <td class="style2">
                            Service Description Delivery
                        </td>
                        <td>
                            <asp:TextBox ID="txtDesDelivery" runat="server" Height="46px" TextMode="MultiLine"
                                Width="186px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="style32">
                            Service Attendance
                        </td>
                        <td class="style14">
                            <asp:DropDownList ID="dlAttendannce" runat="server" Width="190px">
                                <asp:ListItem Value="Attendannce 1">Attendannce 1</asp:ListItem>
                                <asp:ListItem Value="Attendannce 2">Attendannce 2</asp:ListItem>
                                <asp:ListItem Value="Attendannce 3">Attendannce 3</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                        <td class="style33">
                            Service Contact Code
                        </td>
                        <td class="style14">
                            <asp:TextBox ID="txtContactCode" runat="server" Width="185px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="style34">
                            Service Start Expected
                        </td>
                        <td class="style10">
                            <asp:TextBox ID="txtStartExp" runat="server" ReadOnly="true" Width="186px"></asp:TextBox>
                            <cc1:CalendarExtender ID="CalendarExtender1" runat="server" Format="dd/MM/yyyy" TargetControlID="txtStartExp">
                            </cc1:CalendarExtender>
                        </td>
                        <td class="style35">
                            Service Contact Value
                        </td>
                        <td class="style10">
                            <asp:TextBox ID="txtContactValue" runat="server" Width="185px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="style36">
                            Service Start Date
                        </td>
                        <td class="style7">
                            <asp:TextBox ID="txtStartDate" runat="server" ReadOnly="true" Width="186px"></asp:TextBox>
                            <cc1:CalendarExtender ID="Calendar" runat="server" Format="dd/MM/yyyy" TargetControlID="txtStartDate">
                            </cc1:CalendarExtender>
                        </td>
                        <td class="style37">
                            Contact Staged Payment
                        </td>
                        <td class="style7">
                            <asp:CheckBox ID="ckStagedPayment" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td class="style38">
                            Service End Date
                        </td>
                        <td class="style39">
                            <asp:TextBox ID="txtEndDate" runat="server" ReadOnly="true" Width="186px"></asp:TextBox>
                            <cc1:CalendarExtender ID="CalendarExtender2" runat="server" Format="dd/MM/yyyy" TargetControlID="txtEndDate">
                            </cc1:CalendarExtender>
                        </td>
                        <td class="style40">
                            Referral Process Method
                        </td>
                        <td class="style39">
                            <asp:DropDownList ID="dlProcessMethod" runat="server" Width="186px">
                                <asp:ListItem Value="Method 1">Method 1</asp:ListItem>
                                <asp:ListItem Value="Method 2">Method 2</asp:ListItem>
                                <asp:ListItem Value="Method 3">Method 3</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                    </tr>
                    <tr>
                        <td class="style1">
                            Service Extendable
                        </td>
                        <td>
                            <asp:CheckBox ID="ckExtandable" AutoPostBack="false" runat="server" />
                        </td>
                        <td class="style2">
                            Service Time Limited
                        </td>
                        <td>
                            <asp:CheckBox ID="ckTimeLimited" AutoPostBack="false" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td class="style1">
                            &nbsp;
                        </td>
                        <td>
                            <asp:TextBox ID="txtExtenYear" runat="server" Enabled="true" Width="39px"></asp:TextBox>
                            &nbsp;Year
                            <asp:TextBox ID="txtExtenMonth" Enabled="true" runat="server" Width="43px"></asp:TextBox>
                            &nbsp;Months
                        </td>
                        <td class="style2">
                            &nbsp;
                        </td>
                        <td>
                            <asp:TextBox ID="txtLimitedYear" Enabled="true" runat="server" Width="35px"></asp:TextBox>
                            &nbsp;Year
                            <asp:TextBox ID="txtLimitedMonth" runat="server" Enabled="true" Width="38px"></asp:TextBox>
                            &nbsp;Months
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <div class="tab_container">
            <div id="Details2" class="tab_content">
                <table width="760px" cellpadding="0px" cellspacing="0px" border="0" style="font-size: 15px;">
                    <tr>
                        <td width="200px" style="border-bottom: 1px solid #cccccc;">
                            Service Benefits Criterion
                        </td>
                        <td style="border-bottom: 1px solid #cccccc;">
                            <asp:CheckBoxList ID="clBenefit" runat="server" Width="190px" Height="100px">
                            </asp:CheckBoxList>
                        </td>
                        <td width="180px" style="border-bottom: 1px solid #cccccc;">
                            Service Disability Criterion
                        </td>
                        <td style="border-bottom: 1px solid #cccccc;">
                            <asp:CheckBoxList ID="clDisability" runat="server" Width="154px" Height="100px">
                            </asp:CheckBoxList>
                        </td>
                    </tr>
                    <tr>
                        <td width="200px" style="border-bottom: 1px solid #cccccc;">
                            Service Barriers Criterion
                        </td>
                        <td style="border-bottom: 1px solid #cccccc;">
                            <asp:CheckBoxList ID="clBarriers" runat="server" Width="190px" Height="100px">
                            </asp:CheckBoxList>
                        </td>
                        <td width="180px" style="border-bottom: 1px solid #cccccc;">
                            Service Personal Circumstances Criterion
                        </td>
                        <td style="border-bottom: 1px solid #cccccc;">
                            <asp:CheckBoxList ID="clPersonalCri" runat="server" Style="margin-left: 0px" Width="154px"
                                Height="100px">
                            </asp:CheckBoxList>
                        </td>
                    </tr>
                    <tr>
                        <td width="200px" style="border-bottom: 1px solid #cccccc;">
                            Service Ethnicity Criterion
                        </td>
                        <td style="border-bottom: 1px solid #cccccc;">
                            <asp:CheckBoxList ID="clEthnic" runat="server" Style="margin-left: 0px" Width="190px"
                                Height="100px">
                            </asp:CheckBoxList>
                        </td>
                        <td width="180px" style="border-bottom: 1px solid #cccccc;">
                            Other Serivce Participation Crirterion
                        </td>
                        <td style="border-bottom: 1px solid #cccccc;">
                            <asp:CheckBoxList ID="clParticiCri" runat="server" Style="margin-left: 0px" Width="154px"
                                Height="100px">
                            </asp:CheckBoxList>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <div class="tab_container">
            <div id="Details3" class="tab_content">
                <table width="760px" cellpadding="0px" cellspacing="0px" border="0" style="font-size: 15px;">
                    <tr>
                        <td style="border-bottom: 1px solid #cccccc;" class="style41">
                            Client Support Process
                        </td>
                        <td style="border-bottom: 1px solid #cccccc;" class="style43">
                            <asp:CheckBoxList ID="clSupportProcess" runat="server" Width="190px" Height="100px">
                            </asp:CheckBoxList>
                        </td>
                        <td style="border-bottom: 1px solid #cccccc;" class="style44">
                            Client Outcome
                        </td>
                        <td style="border-bottom: 1px solid #cccccc;">
                            <asp:CheckBoxList ID="clClientOutCome" runat="server" Width="154px" Height="100px">
                            </asp:CheckBoxList>
                        </td>
                    </tr>
                    <tr>
                        <td style="border-bottom: 1px solid #cccccc;" class="style41">
                            Intervention
                        </td>
                        <td style="border-bottom: 1px solid #cccccc;" class="style43">
                            <asp:CheckBoxList ID="clIntervention" runat="server" Width="190px" Height="100px">
                            </asp:CheckBoxList>
                        </td>
                        <td style="border-bottom: 1px solid #cccccc;" class="style44">
                            Target Client
                        </td>
                        <td style="border-bottom: 1px solid #cccccc;">
                            <asp:CheckBoxList ID="clTargetClient" runat="server" Style="margin-left: 0px" Width="154px"
                                Height="100px">
                            </asp:CheckBoxList>
                        </td>
                    </tr>
                    <tr>
                        <td style="border-bottom: 1px solid #cccccc;" class="style41">
                            Client Jourrey
                        </td>
                        <td style="border-bottom: 1px solid #cccccc;" class="style43">
                            <asp:CheckBoxList ID="clClientJourrey" runat="server" Style="margin-left: 0px" Width="190px"
                                Height="100px">
                            </asp:CheckBoxList>
                        </td>
                        <td style="border-bottom: 1px solid #cccccc;" class="style44">
                            Accreditations
                        </td>
                        <td style="border-bottom: 1px solid #cccccc;">
                            <asp:CheckBoxList ID="clClientAcc" runat="server" Style="margin-left: 0px" Width="154px"
                                Height="100px">
                            </asp:CheckBoxList>
                        </td>
                    </tr>
                    <tr>
                        <td style="border-bottom: 1px solid #cccccc;" class="style41">
                            Other Services
                        </td>
                        <td style="border-bottom: 1px solid #cccccc;" class="style43">
                            <asp:CheckBoxList ID="clOtherService" runat="server" Style="margin-left: 0px" Width="190px"
                                Height="100px">
                            </asp:CheckBoxList>
                        </td>
                        <td style="border-bottom: 1px solid #cccccc;" class="style44">
                            Referral Source
                        </td>
                        <td style="border-bottom: 1px solid #cccccc;">
                            <asp:CheckBoxList ID="clRefSource" runat="server" Style="margin-left: 0px" Width="154px"
                                Height="100px">
                            </asp:CheckBoxList>
                        </td>
                    </tr>
                    <tr>
                        <td style="border-bottom: 1px solid #cccccc;" class="style41">
                            Support Centres
                        </td>
                        <td style="border-bottom: 1px solid #cccccc;" class="style43">
                            <asp:CheckBoxList ID="clSupportCenter" runat="server" Style="margin-left: 0px" Width="190px"
                                Height="100px">
                            </asp:CheckBoxList>
                        </td>
                        <td style="border-bottom: 1px solid #cccccc;" class="style44">
                            Programme
                        </td>
                        <td style="border-bottom: 1px solid #cccccc;">
                            <asp:DropDownList runat="server" ID="dlProgram" DataTextField="ProgramName" DataValueField="ProgramID"
                                Width="175px" />
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <div class="tab_container">
            <div id="Contract" class="tab_content">
                <table width="760px" cellpadding="0px" cellspacing="0px" border="0" style="font-size: 15px;">
                    <tr>
                        <td width="200px">
                            Contract OutCome
                        </td>
                        <td>
                            <asp:CheckBoxList ID="clContractOutCome" runat="server" Style="margin-left: 0px"
                                Width="190px" Height="100px">
                            </asp:CheckBoxList>
                        </td>
                        <td width="180px">
                            Contract Obligation
                        </td>
                        <td>
                            <asp:CheckBoxList ID="clContractObligation" runat="server" Style="margin-left: 0px"
                                Width="154px" Height="100px">
                            </asp:CheckBoxList>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Participation
                        </td>
                        <td>
                            <asp:DropDownList runat="server" ID="dlParticipation" Width="160px">
                                <asp:ListItem>Mandatory</asp:ListItem>
                                <asp:ListItem>Voluntary</asp:ListItem>
                                <asp:ListItem>Both</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <div class="tab_container">
            <div id="Funding" class="tab_content">
                <table width="760px" cellpadding="0px" cellspacing="0px" border="0" style="font-size: 15px;">
                    <tr>
                        <td colspan="4" class="style3">
                            <b>General</b>
                        </td>
                    </tr>
                    <tr>
                        <td class="style22">
                            Funding Source
                        </td>
                        <td class="style3">
                            <asp:DropDownList runat="server" CssClass="textbox" ID="dlFundingSource">
                                <asp:ListItem Value="Funding Source 1">Funding Source 1</asp:ListItem>
                                <asp:ListItem Value="Funding Source 2">Funding Source 2</asp:ListItem>
                                <asp:ListItem Value="Funding Source 3">Funding Source 3</asp:ListItem>
                                <asp:ListItem Value="Funding Source 4">Funding Source 4</asp:ListItem>
                            </asp:DropDownList>
                        </td>
                        <td class="style15">
                            Funding Needs
                        </td>
                        <td class="style3">
                            <asp:TextBox runat="server" CssClass="textbox" ID="txtFunNeeds"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="style23">
                            Funding Contact Details
                        </td>
                        <td class="style4">
                            <input type="text" id="MediaName" readonly="readonly" style="width: 104px" />
                            <input type="hidden" id="hdMedia" />
                            &nbsp;&nbsp; <a href="#" onclick="PopupMedia();return false;">Lookup</a>
                            <asp:HiddenField ID="idMediaContact" runat="server" />
                        </td>
                        <td class="style16">
                            Funding Continuation Needed
                        </td>
                        <td class="style4">
                            <asp:CheckBox ID="ckFunContiNeed" AutoPostBack="false" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td class="style24">
                            Funding Amount (*)
                        </td>
                        <td class="style5">
                            <asp:TextBox ID="txtFunAmount" CssClass="textbox" runat="server"></asp:TextBox>
                        </td>
                        <td class="style17">
                            Funding Continuation Amount
                        </td>
                        <td class="style5">
                            <asp:TextBox ID="txtFunContiAmount" CssClass="textbox" runat="server"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="style25">
                            Funding Start
                        </td>
                        <td class="style7">
                            <asp:TextBox ID="txtFunStart" CssClass="textbox" runat="server"></asp:TextBox>
                            <cc1:CalendarExtender ID="CalendarExtender3" runat="server" Format="dd/MM/yyyy" TargetControlID="txtFunStart">
                            </cc1:CalendarExtender>
                        </td>
                        <td class="style18" rowspan="2">
                            Funding Continuation Details
                        </td>
                        <td rowspan="2">
                            <asp:TextBox ID="txtFunConDetails" CssClass="textbox" runat="server" TextMode="MultiLine"
                                Width="172px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="style22">
                            Funding End
                        </td>
                        <td class="style3">
                            <asp:TextBox ID="txtFunEnd" CssClass="textbox" runat="server"></asp:TextBox>
                            <cc1:CalendarExtender ID="CalendarExtender4" runat="server" Format="dd/MM/yyyy" TargetControlID="txtFunEnd">
                            </cc1:CalendarExtender>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="4" class="style6">
                            <b>Funding For Service Project</b>
                        </td>
                    </tr>
                    <tr>
                        <td rowspan="2" class="style28">
                            Fundraising for text
                        </td>
                        <td rowspan="2">
                            <asp:TextBox ID="txtFundaisingText" CssClass="textbox" TextMode="MultiLine" runat="server"
                                Height="52px" Width="181px"></asp:TextBox>
                        </td>
                        <td class="style19">
                            Fundraising Needs
                        </td>
                        <td class="style10">
                            <asp:TextBox ID="txtFundaisingNeed" CssClass="textbox" runat="server"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td class="style20">
                            Fundraising Required By
                        </td>
                        <td class="style11">
                            <asp:TextBox ID="txtFundaisingRequiBy" CssClass="textbox" runat="server"></asp:TextBox>
                            <cc1:CalendarExtender ID="CalendarExtender5" runat="server" Format="dd/MM/yyyy" TargetControlID="txtFundaisingRequiBy">
                            </cc1:CalendarExtender>
                        </td>
                    </tr>
                    <tr>
                        <td rowspan="2" class="style28">
                            Fundraising why
                        </td>
                        <td rowspan="2">
                            <asp:TextBox ID="txtFundaisingWhy" CssClass="textbox" TextMode="MultiLine" runat="server"
                                Height="54px"></asp:TextBox>
                        </td>
                        <td class="style15">
                            Fundraising Complete
                        </td>
                        <td class="style3">
                            <asp:CheckBox ID="ckFundaisingComplete" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td class="style19">
                            Fundraising Complete Date
                        </td>
                        <td class="style10">
                            <asp:TextBox ID="txtFundaisingCompleDate" CssClass="textbox" runat="server"></asp:TextBox>
                            <cc1:CalendarExtender ID="CalendarExtender6" runat="server" Format="dd/MM/yyyy" TargetControlID="txtFundaisingCompleDate">
                            </cc1:CalendarExtender>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="4" class="style12">
                            <b>Fundraising Donor</b>
                        </td>
                    </tr>
                    <tr>
                        <td class="style27">
                            Fundraising Donor Anonymous
                        </td>
                        <td class="style10">
                            <asp:CheckBox ID="ckFundaisingDonorAnon" runat="server" />
                        </td>
                        <td class="style19">
                            Fundraising Donation Date
                        </td>
                        <td class="style10">
                            <asp:TextBox ID="txtFundaisingDonationDate" CssClass="textbox" runat="server"></asp:TextBox>
                            <cc1:CalendarExtender ID="CalendarExtender7" runat="server" Format="dd/MM/yyyy" TargetControlID="txtFundaisingDonationDate">
                            </cc1:CalendarExtender>
                        </td>
                    </tr>
                    <tr>
                        <td class="style24">
                            Fundraising Donor Amount
                        </td>
                        <td class="style5">
                            <asp:TextBox ID="txtFundaisingDonoAmount" CssClass="textbox" runat="server"></asp:TextBox>
                        </td>
                        <td class="style17">
                            Fundraising Donation Incrementai
                        </td>
                        <td class="style5">
                            <asp:CheckBox ID="ckFundaisingDonaIncrement" runat="server" />
                        </td>
                    </tr>
                </table>
            </div>
        </div>
        <div class="tab_container">
            <div id="Org" class="tab_content">
                <asp:GridView ID="gvOrg" AutoGenerateColumns="False" DataKeyNames="ID" runat="server"
                    Width="725px" Font-Size="15px" BackColor="White" BorderColor="#CCCCCC" AllowSorting="true"
                    BorderStyle="None" BorderWidth="1px" CellPadding="3" OnRowCommand="gvOrg_RowCommand">
                    <Columns>
                        <asp:TemplateField HeaderText="ID" Visible="false">
                            <ItemTemplate>
                                <asp:Label ID="lbID" runat="server" Text='<%#Eval("ID") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Service Name">
                            <ItemTemplate>
                                <asp:Label ID="lbName" runat="server" Text='<%#Eval("Name") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Description">
                            <ItemTemplate>
                                <asp:Label ID="lbHOA" runat="server" Text='<%#Eval("Des") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Roles">
                            <ItemTemplate>
                                <asp:Label ID="lbRole" runat="server"></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <a href="#" onclick="ChangeRole();return false;">Edit roles</a>
                                <%--<asp:LinkButton runat="server" ID="editrole" Text="Edit roles" CommandName="Role" />--%>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <FooterStyle BackColor="White" ForeColor="#000066" />
                    <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                    <RowStyle ForeColor="#000066" />
                    <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                </asp:GridView>
                <input type="hidden" id="ValueRole" />
                <asp:HiddenField runat="server" ID="ValueRoles" />
                <br />
                <asp:Label runat="server" ID="mess"></asp:Label>
            </div>
        </div>
        <div class="tab_container">
            <div id="Premises" class="tab_content">
                <asp:GridView ID="gvPremise" AutoGenerateColumns="False" DataKeyNames="premisesid"
                    runat="server" Width="709px" Font-Size="15px" BackColor="White" BorderColor="#CCCCCC"
                    BorderStyle="None" BorderWidth="1px" CellPadding="3" OnRowCommand="gvPremise_RowCommand">
                    <Columns>
                        <asp:TemplateField HeaderText="ID" Visible="false">
                            <ItemTemplate>
                                <asp:Label ID="lbID" runat="server" Text='<%#Eval("premisesid") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Premise Name">
                            <ItemTemplate>
                                <asp:Label ID="lbName" runat="server" Text='<%#Eval("locationname") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Address Line 1">
                            <ItemTemplate>
                                <asp:Label ID="lbHOA" runat="server" Text='<%#Eval("Addressline1") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Post Code">
                            <ItemTemplate>
                                <asp:Label ID="lbPostcode" runat="server" Text='<%#Eval("phonnumber") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Project Code">
                            <ItemTemplate>
                                <asp:Label ID="lbProjectcode" runat="server" Text='<%#Eval("projectcode") %>'></asp:Label>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <asp:LinkButton ID="rmPremise" runat="server" CausesValidation="false" CommandArgument='<%#Eval("premisesid") %>'
                                    EnableViewState="false" CommandName="Remove" Text="Remove"></asp:LinkButton>
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <FooterStyle BackColor="White" ForeColor="#000066" />
                    <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                    <RowStyle ForeColor="#000066" />
                    <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                </asp:GridView>
                <p style="text-align: right; margin-right: 10px;">
                    <asp:Button runat="server" ID="btnAssocicate" CssClass="button" Text="Associate new Premise"
                        Width="150px" />
                </p>
                <cc1:ModalPopupExtender ID="ModalPopupExtender21" runat="server" CancelControlID="lbClose"
                    TargetControlID="btnAssocicate" PopupControlID="pnAssService" X="410" Drag="true">
                </cc1:ModalPopupExtender>
                <asp:Panel runat="server" ID="pnAssService">
                    <div style="border: 1px solid gray; background-color: lavender; font-size: 15px;">
                        <span style="text-align: right;"><a href="#" id="lbClose" style="text-decoration: none;">
                            X</a></span>
                        <asp:GridView ID="GridView1" AutoGenerateColumns="False" DataKeyNames="PremisesID"
                            runat="server" Width="709px" Font-Size="15px" BackColor="White" BorderColor="#CCCCCC"
                            AllowSorting="true" BorderStyle="None" BorderWidth="1px" CellPadding="3">
                            <Columns>
                                <asp:TemplateField>
                                    <ItemTemplate>
                                        <asp:RadioButton ID="rdbauthid" runat="server" GroupName="selectrd" onclick="javascript:CheckOtherIsCheckedByGV(this);" />
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="ID" Visible="false">
                                    <ItemTemplate>
                                        <asp:Label ID="lbID" runat="server" Text='<%#Eval("PremisesID") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Location Name">
                                    <ItemTemplate>
                                        <asp:Label ID="lbName" runat="server" Text='<%#Eval("LocationName") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Address Line 1">
                                    <ItemTemplate>
                                        <asp:Label ID="lbHOA" runat="server" Text='<%#Eval("AddressLine1") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Post Code">
                                    <ItemTemplate>
                                        <asp:Label ID="lbPostcode" runat="server" Text='<%#Eval("PostCode") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                                <asp:TemplateField HeaderText="Is Active">
                                    <ItemTemplate>
                                        <asp:Label ID="lbActive" runat="server" Text='<%#Eval("IsActive") %>'></asp:Label>
                                    </ItemTemplate>
                                </asp:TemplateField>
                            </Columns>
                            <FooterStyle BackColor="White" ForeColor="#000066" />
                            <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" />
                            <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                            <RowStyle ForeColor="#000066" />
                            <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                        </asp:GridView>
                        <asp:UpdatePanel ID="Tab123" runat="server">
                            <ContentTemplate>
                                Project Code:<asp:TextBox runat="server" ID="txtProjectCode"></asp:TextBox>&nbsp;
                                <asp:Button runat="server" ID="Select" Text="Select" OnClick="Select_Click" /><br />
                                <asp:Label runat="server" ID="lbtbao"></asp:Label>
                            </ContentTemplate>
                            <Triggers>
                                <asp:AsyncPostBackTrigger ControlID="Select" EventName="Click" />
                            </Triggers>
                        </asp:UpdatePanel>
                        <asp:UpdateProgress ID="pro" runat="server" AssociatedUpdatePanelID="Tab123">
                        </asp:UpdateProgress>
                    </div>
                </asp:Panel>
            </div>
        </div>
    </div>
    <asp:Button ID="btnSave" runat="server" Text="Save" CssClass="button" OnClientClick="getValueHidden()"
        OnClick="btnSave_Click" />
    <asp:Button ID="btnBack" runat="server" Text="Back" CssClass="button" OnClick="btnBack_Click" /><br />
    <p style="width: 100%; background-color: lavender; line-height: 25px;">
        <asp:Label ID="Label2" runat="server"></asp:Label>
    </p>
</asp:Panel>
